
# maximum flying time (over all legs)
subject to c_max_total_flying_tm:
sum { (i,j,k,l) in ARCS } itinerary[i,j,k,l]*flying_tm[k] <= p_max_total_flying_tm;

# enforce maximum travel time
subject to c_max_total_travel_tm:
sum { (i,j,k,l) in ARCS } itinerary[i,j,k,l]*flying_tm[k]
+ sum {i in nodes diff {source, dest}} (sum {(i,j,k,l) in ARCS} itinerary[i,j,k,l]*(24*(l-1) + floor(depart_tm[k]/100) + (depart_tm[k] mod 100)/60)
- sum {(o,i,m,n) in ARCS} itinerary[o,i,m,n]*(24*(n + arrive_day[m] - 1) + floor(arrive_tm[m]/100) + (arrive_tm[m] mod 100)/60)) <= p_max_total_travel_tm;


